<?php
$this->breadcrumbs = array(
	'材料列表' => array(
		'index'
	),
	$model->name,
);

$this->userActions = array(
	//array('label'=>'List Material', 'url'=>array('index')),
	array(
		'label' => '新建材料',
		'url' => array(
			'create'
		),
		'visible' => Yii::app()->user->checkAccess('materialManage'),
		'iconClass' => 'icon-cog-add'
	),
	array(
		'label' => '更新 ' . $model->name,
		'url' => array(
			'update',
			'id' => $model->id
		),
		'visible' => Yii::app()->user->checkAccess('materialManage'),
		'iconClass' => 'icon-cog-edit'
	),
	array(
		'label' => '管理 ' . $model->modelCount . ' 种型号',
		'url' => array(
			'updateModels',
			'id' => $model->id
		),
		'visible' => Yii::app()->user->checkAccess('materialManage'),
		'iconClass' => 'icon-cog-edit'
	),
	array(
		'label' => '删除 ' . $model->name,
		'url' => '#',
		'linkOptions' => array(
			'submit' => array(
				'delete',
				'id' => $model->id
			),
			'confirm' => '确定要删除 ' . $model->name . ' 吗？'
		),
		'visible' => false && Yii::app()->user->checkAccess('materialManage'),
		'iconClass' => 'icon-cog-delete'
	),
//	array(
//		'label' => 'Manage Material',
//		'url' => array(
//			'admin'
//		)
//	),
);
?>

<h1>材料 <?php echo $model->name; ?></h1>
<?php $this
	->widget('zii.widgets.CDetailView',
		array(
			'data' => $model,
			'attributes' => array(
				//'id',
				'category.name',
				'name',
			),
		));
?>
<div class="span-6 sub-section-row">
<?php
$this->renderPartial('_viewMaterialAltNames', array(
		'model' => $model
	));
?>
</div>
<div class="span-6 sub-section-row">
<?php
$this->renderPartial('_viewMaterialTags', array(
		'model' => $model
	));
?>
</div>
<div class="span-8 last sub-section-row">
<?php
$this->renderPartial('_viewMaterialModels', array(
		'model' => $model
	));
?>
</div>
<div class="clear"></div>
